#include <iostream>

using namespace std;
const int MOD=1000000007;
const int N=1e7+10;

int f[N][3];
int main()
{
	int n;
	cin>>n;
	f[0][0]=1;
	f[1][0]=1;
	for(int i=1;i<=n;i++)
	{
		f[i][0]=((f[i-1][0]+f[i-2][0])%MOD+(f[i-1][1]+f[i-1][2])%MOD)%MOD;
		f[i][1]=(f[i-2][0]+f[i-1][2])%MOD;
		f[i][2]=(f[i-2][0]+f[i-1][1])%MOD;
	}
	cout<<f[n][0]<<endl;
	return 0;
}
